package com.lin.services.impl;

import com.lin.dao.LogDao;
import com.lin.pojo.Log;
import com.lin.services.LogServices;
import com.lin.utils.ShiroUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LogServicesImpl implements LogServices {
    @Autowired
    LogDao logDao;

    @Override
    public int insertLog(Log log) {
        return logDao.insertLog(log);
    }

    @Override
    public List<Log> listLog() {
        Integer storeId = ShiroUtil.getUser().getStoreId();
        return logDao.listLog(storeId);
    }
}
